package com.dc.chat.controller;

import com.dc.chat.app.biz.FeedBackBiz;
import com.dc.chat.entity.to.ResponseBean;
import com.dc.chat.entity.to.feedBack.AddFeedBackReq;
import com.dc.chat.interceptor.security.Security;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/feedBack")
public class FeedBackController {
    @Resource
    FeedBackBiz feedBackBiz;
    @Security
    @PostMapping("/addFeedBack")
    public ResponseBean<Integer> addFeedBack(@Validated @RequestBody AddFeedBackReq req){
        return feedBackBiz.addFeedBack(req.getFeedBack());
    }
}
